<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="磅单编码" prop="bdbm">
        <el-input
          v-model="queryParams.bdbm"
          placeholder="请输入磅单编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="倒运磅单类型" prop="dybdlx">
        <el-input
          v-model="queryParams.dybdlx"
          placeholder="请输入倒运磅单类型"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="入厂日期时间" prop="rcrqsj">
        <el-date-picker clearable
          v-model="queryParams.rcrqsj"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择入厂日期时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="出厂日期时间" prop="ccrqsj">
        <el-date-picker clearable
          v-model="queryParams.ccrqsj"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择出厂日期时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="收发地点" prop="sfdd">
        <el-input
          v-model="queryParams.sfdd"
          placeholder="请输入收发地点"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="部门编码" prop="bmbm">
        <el-input
          v-model="queryParams.bmbm"
          placeholder="请输入部门编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="调入部门" prop="drbm">
        <el-input
          v-model="queryParams.drbm"
          placeholder="请输入调入部门"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="人员编码" prop="rybm">
        <el-input
          v-model="queryParams.rybm"
          placeholder="请输入人员编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="调入仓库编码" prop="trckbm">
        <el-input
          v-model="queryParams.trckbm"
          placeholder="请输入调入仓库编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['transport/inner:jldybd:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['transport/inner:jldybd:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['transport/inner:jldybd:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['transport/inner:jldybd:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="jldybdList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="主键" align="center" prop="jlDybdoid" />
      <el-table-column label="磅单编码" align="center" prop="bdbm" />
      <el-table-column label="倒运磅单类型" align="center" prop="dybdlx" />
      <el-table-column label="入厂日期时间" align="center" prop="rcrqsj" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.rcrqsj, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="出厂日期时间" align="center" prop="ccrqsj" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ccrqsj, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="收发地点" align="center" prop="sfdd" />
      <el-table-column label="部门编码" align="center" prop="bmbm" />
      <el-table-column label="调入部门" align="center" prop="drbm" />
      <el-table-column label="人员编码" align="center" prop="rybm" />
      <el-table-column label="调入仓库编码" align="center" prop="trckbm" />
      <el-table-column label="原发数" align="center" prop="yfs" />
      <el-table-column label="原发毛" align="center" prop="yfm" />
      <el-table-column label="原发皮" align="center" prop="yfp" />
      <el-table-column label="原发净" align="center" prop="yfj" />
      <el-table-column label="毛重" align="center" prop="mz" />
      <el-table-column label="皮重" align="center" prop="pz" />
      <el-table-column label="净重" align="center" prop="jz" />
      <el-table-column label="扣重" align="center" prop="kz1" />
      <el-table-column label="超重" align="center" prop="kz2" />
      <el-table-column label="实收数量" align="center" prop="sssl" />
      <el-table-column label="制单人" align="center" prop="zdr" />
      <el-table-column label="监磅员" align="center" prop="jby" />
      <el-table-column label="司磅地点" align="center" prop="sbdd" />
      <el-table-column label="提货磅单编码" align="center" prop="thbdbm" />
      <el-table-column label="提货磅单明细" align="center" prop="thbdmx" />
      <el-table-column label="提货磅单数量" align="center" prop="thbdsl" />
      <el-table-column label="运输磅单合同" align="center" prop="ysbdht" />
      <el-table-column label="结算编码" align="center" prop="jsbm" />
      <el-table-column label="化验编码" align="center" prop="hybm" />
      <el-table-column label="制样日期" align="center" prop="zyrq" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.zyrq, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="制样人" align="center" prop="zyr" />
      <el-table-column label="化验编码采样" align="center" prop="hybmcy" />
      <el-table-column label="采样日期" align="center" prop="cyrq" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.cyrq, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="采样人" align="center" prop="cyr" />
      <el-table-column label="化验单编码" align="center" prop="hydbm" />
      <el-table-column label="化验日期" align="center" prop="hyrq" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.hyrq, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="化验人" align="center" prop="hyr" />
      <el-table-column label="对方票号" align="center" prop="dfph" />
      <el-table-column label="对账编码" align="center" prop="dzbm" />
      <el-table-column label="备注" align="center" prop="bz" />
      <el-table-column label="审核人1" align="center" prop="shr1" />
      <el-table-column label="审核人2" align="center" prop="shr2" />
      <el-table-column label="审核人3" align="center" prop="shr3" />
      <el-table-column label="存货批号" align="center" prop="chph" />
      <el-table-column label="堆放地点" align="center" prop="dfdd" />
      <el-table-column label="外观" align="center" prop="wg" />
      <el-table-column label="扣率" align="center" prop="kl" />
      <el-table-column label="单据类型" align="center" prop="djlx" />
      <el-table-column label="单据标识" align="center" prop="djbs" />
      <el-table-column label="是否作废" align="center" prop="del" />
      <el-table-column label="单据状态" align="center" prop="djzt" />
      <el-table-column label="出厂制单人" align="center" prop="cczdr" />
      <el-table-column label="卡号" align="center" prop="card" />
      <el-table-column label="班次" align="center" prop="banci" />
      <el-table-column label="入库日期" align="center" prop="rkrq" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.rkrq, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="入库时间" align="center" prop="rksj" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.rksj, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="出库日期" align="center" prop="ckrq" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ckrq, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="出库时间" align="center" prop="cksj" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.cksj, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="库管" align="center" prop="kuguan" />
      <el-table-column label="铅封编码" align="center" prop="qfbm" />
      <el-table-column label="出厂车数" align="center" prop="cccs" />
      <el-table-column label="车辆编码" align="center" prop="clbm" />
      <el-table-column label="调出单位OID" align="center" prop="dcdwoid" />
      <el-table-column label="调运指令OID" align="center" prop="fyDyzloid" />
      <el-table-column label="倒运派车单OID" align="center" prop="fyDaoyunpaicheoid" />
      <el-table-column label="客商档案OID" align="center" prop="jcKeshangdaoid" />
      <el-table-column label="存货档案OID" align="center" prop="jcInventoryoid" />
      <el-table-column label="车辆档案OID" align="center" prop="jcCheliangdaoid" />
      <el-table-column label="调入单位OID" align="center" prop="drdwoid" />
      <el-table-column label="承运单位OID" align="center" prop="cydwoid" />
      <el-table-column label="仓库档案OID" align="center" prop="jcWarehouseoid" />
      <el-table-column label="运费结算OID" align="center" prop="jsYunfeioid" />
      <el-table-column label="运输合同OID" align="center" prop="htYunshuoid" />
      <el-table-column label="倒运门禁OID" align="center" prop="mjDaoyunoid" />
      <el-table-column label="车辆行走路线OID" align="center" prop="jcIcFlowoid" />
      <el-table-column label="IC卡档案OID" align="center" prop="jcIcCardoid" />
      <el-table-column label="工作地点OID" align="center" prop="jcGongzuoddoid" />
      <el-table-column label="收发地点OID" align="center" prop="jcShoufaoid" />
      <el-table-column label="监磅员OID" align="center" prop="jbyoid" />
      <el-table-column label="工作地点OID2" align="center" prop="jcGongzuoddoid2" />
      <el-table-column label="司机姓名" align="center" prop="sjxm" />
      <el-table-column label="从业资格证" align="center" prop="cyzgz" />
      <el-table-column label="驾驶证" align="center" prop="jsz" />
      <el-table-column label="补打次数" align="center" prop="shbs" />
      <el-table-column label="轴数" align="center" prop="zhoushu" />
      <el-table-column label="关联磅单OID" align="center" prop="glbdoid" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['transport/inner:jldybd:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['transport/inner:jldybd:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改调运指令对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="主键" prop="jlDybdoid">
          <el-input v-model="form.jlDybdoid" placeholder="请输入主键" />
        </el-form-item>
        <el-form-item label="磅单编码" prop="bdbm">
          <el-input v-model="form.bdbm" placeholder="请输入磅单编码" />
        </el-form-item>
        <el-form-item label="倒运磅单类型" prop="dybdlx">
          <el-input v-model="form.dybdlx" placeholder="请输入倒运磅单类型" />
        </el-form-item>
        <el-form-item label="入厂日期时间" prop="rcrqsj">
          <el-date-picker clearable
            v-model="form.rcrqsj"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择入厂日期时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="出厂日期时间" prop="ccrqsj">
          <el-date-picker clearable
            v-model="form.ccrqsj"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择出厂日期时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="收发地点" prop="sfdd">
          <el-input v-model="form.sfdd" placeholder="请输入收发地点" />
        </el-form-item>
        <el-form-item label="部门编码" prop="bmbm">
          <el-input v-model="form.bmbm" placeholder="请输入部门编码" />
        </el-form-item>
        <el-form-item label="调入部门" prop="drbm">
          <el-input v-model="form.drbm" placeholder="请输入调入部门" />
        </el-form-item>
        <el-form-item label="人员编码" prop="rybm">
          <el-input v-model="form.rybm" placeholder="请输入人员编码" />
        </el-form-item>
        <el-form-item label="调入仓库编码" prop="trckbm">
          <el-input v-model="form.trckbm" placeholder="请输入调入仓库编码" />
        </el-form-item>
        <el-form-item label="原发数" prop="yfs">
          <el-input v-model="form.yfs" placeholder="请输入原发数" />
        </el-form-item>
        <el-form-item label="原发毛" prop="yfm">
          <el-input v-model="form.yfm" placeholder="请输入原发毛" />
        </el-form-item>
        <el-form-item label="原发皮" prop="yfp">
          <el-input v-model="form.yfp" placeholder="请输入原发皮" />
        </el-form-item>
        <el-form-item label="原发净" prop="yfj">
          <el-input v-model="form.yfj" placeholder="请输入原发净" />
        </el-form-item>
        <el-form-item label="毛重" prop="mz">
          <el-input v-model="form.mz" placeholder="请输入毛重" />
        </el-form-item>
        <el-form-item label="皮重" prop="pz">
          <el-input v-model="form.pz" placeholder="请输入皮重" />
        </el-form-item>
        <el-form-item label="净重" prop="jz">
          <el-input v-model="form.jz" placeholder="请输入净重" />
        </el-form-item>
        <el-form-item label="扣重" prop="kz1">
          <el-input v-model="form.kz1" placeholder="请输入扣重" />
        </el-form-item>
        <el-form-item label="超重" prop="kz2">
          <el-input v-model="form.kz2" placeholder="请输入超重" />
        </el-form-item>
        <el-form-item label="实收数量" prop="sssl">
          <el-input v-model="form.sssl" placeholder="请输入实收数量" />
        </el-form-item>
        <el-form-item label="制单人" prop="zdr">
          <el-input v-model="form.zdr" placeholder="请输入制单人" />
        </el-form-item>
        <el-form-item label="监磅员" prop="jby">
          <el-input v-model="form.jby" placeholder="请输入监磅员" />
        </el-form-item>
        <el-form-item label="司磅地点" prop="sbdd">
          <el-input v-model="form.sbdd" placeholder="请输入司磅地点" />
        </el-form-item>
        <el-form-item label="提货磅单编码" prop="thbdbm">
          <el-input v-model="form.thbdbm" placeholder="请输入提货磅单编码" />
        </el-form-item>
        <el-form-item label="提货磅单明细" prop="thbdmx">
          <el-input v-model="form.thbdmx" placeholder="请输入提货磅单明细" />
        </el-form-item>
        <el-form-item label="提货磅单数量" prop="thbdsl">
          <el-input v-model="form.thbdsl" placeholder="请输入提货磅单数量" />
        </el-form-item>
        <el-form-item label="运输磅单合同" prop="ysbdht">
          <el-input v-model="form.ysbdht" placeholder="请输入运输磅单合同" />
        </el-form-item>
        <el-form-item label="结算编码" prop="jsbm">
          <el-input v-model="form.jsbm" placeholder="请输入结算编码" />
        </el-form-item>
        <el-form-item label="化验编码" prop="hybm">
          <el-input v-model="form.hybm" placeholder="请输入化验编码" />
        </el-form-item>
        <el-form-item label="制样日期" prop="zyrq">
          <el-date-picker clearable
            v-model="form.zyrq"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择制样日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="制样人" prop="zyr">
          <el-input v-model="form.zyr" placeholder="请输入制样人" />
        </el-form-item>
        <el-form-item label="化验编码采样" prop="hybmcy">
          <el-input v-model="form.hybmcy" placeholder="请输入化验编码采样" />
        </el-form-item>
        <el-form-item label="采样日期" prop="cyrq">
          <el-date-picker clearable
            v-model="form.cyrq"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择采样日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="采样人" prop="cyr">
          <el-input v-model="form.cyr" placeholder="请输入采样人" />
        </el-form-item>
        <el-form-item label="化验单编码" prop="hydbm">
          <el-input v-model="form.hydbm" placeholder="请输入化验单编码" />
        </el-form-item>
        <el-form-item label="化验日期" prop="hyrq">
          <el-date-picker clearable
            v-model="form.hyrq"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择化验日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="化验人" prop="hyr">
          <el-input v-model="form.hyr" placeholder="请输入化验人" />
        </el-form-item>
        <el-form-item label="对方票号" prop="dfph">
          <el-input v-model="form.dfph" placeholder="请输入对方票号" />
        </el-form-item>
        <el-form-item label="对账编码" prop="dzbm">
          <el-input v-model="form.dzbm" placeholder="请输入对账编码" />
        </el-form-item>
        <el-form-item label="备注" prop="bz">
          <el-input v-model="form.bz" placeholder="请输入备注" />
        </el-form-item>
        <el-form-item label="审核人1" prop="shr1">
          <el-input v-model="form.shr1" placeholder="请输入审核人1" />
        </el-form-item>
        <el-form-item label="审核人2" prop="shr2">
          <el-input v-model="form.shr2" placeholder="请输入审核人2" />
        </el-form-item>
        <el-form-item label="审核人3" prop="shr3">
          <el-input v-model="form.shr3" placeholder="请输入审核人3" />
        </el-form-item>
        <el-form-item label="存货批号" prop="chph">
          <el-input v-model="form.chph" placeholder="请输入存货批号" />
        </el-form-item>
        <el-form-item label="堆放地点" prop="dfdd">
          <el-input v-model="form.dfdd" placeholder="请输入堆放地点" />
        </el-form-item>
        <el-form-item label="外观" prop="wg">
          <el-input v-model="form.wg" placeholder="请输入外观" />
        </el-form-item>
        <el-form-item label="扣率" prop="kl">
          <el-input v-model="form.kl" placeholder="请输入扣率" />
        </el-form-item>
        <el-form-item label="单据类型" prop="djlx">
          <el-input v-model="form.djlx" placeholder="请输入单据类型" />
        </el-form-item>
        <el-form-item label="单据标识" prop="djbs">
          <el-input v-model="form.djbs" placeholder="请输入单据标识" />
        </el-form-item>
        <el-form-item label="是否作废" prop="del">
          <el-input v-model="form.del" placeholder="请输入是否作废" />
        </el-form-item>
        <el-form-item label="单据状态" prop="djzt">
          <el-input v-model="form.djzt" placeholder="请输入单据状态" />
        </el-form-item>
        <el-form-item label="出厂制单人" prop="cczdr">
          <el-input v-model="form.cczdr" placeholder="请输入出厂制单人" />
        </el-form-item>
        <el-form-item label="卡号" prop="card">
          <el-input v-model="form.card" placeholder="请输入卡号" />
        </el-form-item>
        <el-form-item label="班次" prop="banci">
          <el-input v-model="form.banci" placeholder="请输入班次" />
        </el-form-item>
        <el-form-item label="入库日期" prop="rkrq">
          <el-date-picker clearable
            v-model="form.rkrq"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择入库日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="入库时间" prop="rksj">
          <el-date-picker clearable
            v-model="form.rksj"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择入库时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="出库日期" prop="ckrq">
          <el-date-picker clearable
            v-model="form.ckrq"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择出库日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="出库时间" prop="cksj">
          <el-date-picker clearable
            v-model="form.cksj"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择出库时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="库管" prop="kuguan">
          <el-input v-model="form.kuguan" placeholder="请输入库管" />
        </el-form-item>
        <el-form-item label="铅封编码" prop="qfbm">
          <el-input v-model="form.qfbm" placeholder="请输入铅封编码" />
        </el-form-item>
        <el-form-item label="出厂车数" prop="cccs">
          <el-input v-model="form.cccs" placeholder="请输入出厂车数" />
        </el-form-item>
        <el-form-item label="车辆编码" prop="clbm">
          <el-input v-model="form.clbm" placeholder="请输入车辆编码" />
        </el-form-item>
        <el-form-item label="C01" prop="c01">
          <el-input v-model="form.c01" placeholder="请输入C01" />
        </el-form-item>
        <el-form-item label="C02" prop="c02">
          <el-input v-model="form.c02" placeholder="请输入C02" />
        </el-form-item>
        <el-form-item label="C03" prop="c03">
          <el-input v-model="form.c03" placeholder="请输入C03" />
        </el-form-item>
        <el-form-item label="C04" prop="c04">
          <el-input v-model="form.c04" placeholder="请输入C04" />
        </el-form-item>
        <el-form-item label="C05" prop="c05">
          <el-input v-model="form.c05" placeholder="请输入C05" />
        </el-form-item>
        <el-form-item label="C06" prop="c06">
          <el-input v-model="form.c06" placeholder="请输入C06" />
        </el-form-item>
        <el-form-item label="C07" prop="c07">
          <el-input v-model="form.c07" placeholder="请输入C07" />
        </el-form-item>
        <el-form-item label="C08" prop="c08">
          <el-input v-model="form.c08" placeholder="请输入C08" />
        </el-form-item>
        <el-form-item label="C09" prop="c09">
          <el-input v-model="form.c09" placeholder="请输入C09" />
        </el-form-item>
        <el-form-item label="C10" prop="c10">
          <el-input v-model="form.c10" placeholder="请输入C10" />
        </el-form-item>
        <el-form-item label="N01" prop="n01">
          <el-input v-model="form.n01" placeholder="请输入N01" />
        </el-form-item>
        <el-form-item label="N02" prop="n02">
          <el-input v-model="form.n02" placeholder="请输入N02" />
        </el-form-item>
        <el-form-item label="N03" prop="n03">
          <el-input v-model="form.n03" placeholder="请输入N03" />
        </el-form-item>
        <el-form-item label="N04" prop="n04">
          <el-input v-model="form.n04" placeholder="请输入N04" />
        </el-form-item>
        <el-form-item label="N05" prop="n05">
          <el-input v-model="form.n05" placeholder="请输入N05" />
        </el-form-item>
        <el-form-item label="N06" prop="n06">
          <el-input v-model="form.n06" placeholder="请输入N06" />
        </el-form-item>
        <el-form-item label="N07" prop="n07">
          <el-input v-model="form.n07" placeholder="请输入N07" />
        </el-form-item>
        <el-form-item label="N08" prop="n08">
          <el-input v-model="form.n08" placeholder="请输入N08" />
        </el-form-item>
        <el-form-item label="N09" prop="n09">
          <el-input v-model="form.n09" placeholder="请输入N09" />
        </el-form-item>
        <el-form-item label="N10" prop="n10">
          <el-input v-model="form.n10" placeholder="请输入N10" />
        </el-form-item>
        <el-form-item label="超载标示" prop="czbs">
          <el-input v-model="form.czbs" placeholder="请输入超载标示" />
        </el-form-item>
        <el-form-item label="调出单位OID" prop="dcdwoid">
          <el-input v-model="form.dcdwoid" placeholder="请输入调出单位OID" />
        </el-form-item>
        <el-form-item label="调运指令OID" prop="fyDyzloid">
          <el-input v-model="form.fyDyzloid" placeholder="请输入调运指令OID" />
        </el-form-item>
        <el-form-item label="倒运派车单OID" prop="fyDaoyunpaicheoid">
          <el-input v-model="form.fyDaoyunpaicheoid" placeholder="请输入倒运派车单OID" />
        </el-form-item>
        <el-form-item label="客商档案OID" prop="jcKeshangdaoid">
          <el-input v-model="form.jcKeshangdaoid" placeholder="请输入客商档案OID" />
        </el-form-item>
        <el-form-item label="存货档案OID" prop="jcInventoryoid">
          <el-input v-model="form.jcInventoryoid" placeholder="请输入存货档案OID" />
        </el-form-item>
        <el-form-item label="车辆档案OID" prop="jcCheliangdaoid">
          <el-input v-model="form.jcCheliangdaoid" placeholder="请输入车辆档案OID" />
        </el-form-item>
        <el-form-item label="调入单位OID" prop="drdwoid">
          <el-input v-model="form.drdwoid" placeholder="请输入调入单位OID" />
        </el-form-item>
        <el-form-item label="承运单位OID" prop="cydwoid">
          <el-input v-model="form.cydwoid" placeholder="请输入承运单位OID" />
        </el-form-item>
        <el-form-item label="仓库档案OID" prop="jcWarehouseoid">
          <el-input v-model="form.jcWarehouseoid" placeholder="请输入仓库档案OID" />
        </el-form-item>
        <el-form-item label="运费结算OID" prop="jsYunfeioid">
          <el-input v-model="form.jsYunfeioid" placeholder="请输入运费结算OID" />
        </el-form-item>
        <el-form-item label="运输合同OID" prop="htYunshuoid">
          <el-input v-model="form.htYunshuoid" placeholder="请输入运输合同OID" />
        </el-form-item>
        <el-form-item label="倒运门禁OID" prop="mjDaoyunoid">
          <el-input v-model="form.mjDaoyunoid" placeholder="请输入倒运门禁OID" />
        </el-form-item>
        <el-form-item label="车辆行走路线OID" prop="jcIcFlowoid">
          <el-input v-model="form.jcIcFlowoid" placeholder="请输入车辆行走路线OID" />
        </el-form-item>
        <el-form-item label="IC卡档案OID" prop="jcIcCardoid">
          <el-input v-model="form.jcIcCardoid" placeholder="请输入IC卡档案OID" />
        </el-form-item>
        <el-form-item label="工作地点OID" prop="jcGongzuoddoid">
          <el-input v-model="form.jcGongzuoddoid" placeholder="请输入工作地点OID" />
        </el-form-item>
        <el-form-item label="收发地点OID" prop="jcShoufaoid">
          <el-input v-model="form.jcShoufaoid" placeholder="请输入收发地点OID" />
        </el-form-item>
        <el-form-item label="监磅员OID" prop="jbyoid">
          <el-input v-model="form.jbyoid" placeholder="请输入监磅员OID" />
        </el-form-item>
        <el-form-item label="工作地点OID2" prop="jcGongzuoddoid2">
          <el-input v-model="form.jcGongzuoddoid2" placeholder="请输入工作地点OID2" />
        </el-form-item>
        <el-form-item label="司机姓名" prop="sjxm">
          <el-input v-model="form.sjxm" placeholder="请输入司机姓名" />
        </el-form-item>
        <el-form-item label="从业资格证" prop="cyzgz">
          <el-input v-model="form.cyzgz" placeholder="请输入从业资格证" />
        </el-form-item>
        <el-form-item label="驾驶证" prop="jsz">
          <el-input v-model="form.jsz" placeholder="请输入驾驶证" />
        </el-form-item>
        <el-form-item label="补打次数" prop="shbs">
          <el-input v-model="form.shbs" placeholder="请输入补打次数" />
        </el-form-item>
        <el-form-item label="轴数" prop="zhoushu">
          <el-input v-model="form.zhoushu" placeholder="请输入轴数" />
        </el-form-item>
        <el-form-item label="关联磅单OID" prop="glbdoid">
          <el-input v-model="form.glbdoid" placeholder="请输入关联磅单OID" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listJldybd, getJldybd, delJldybd, addJldybd, updateJldybd } from "@/api/transport/inner/jldybd";

export default {
  name: "Jldybd",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 调运指令表格数据
      jldybdList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        bdbm: null,
        dybdlx: null,
        rcrqsj: null,
        ccrqsj: null,
        sfdd: null,
        bmbm: null,
        drbm: null,
        rybm: null,
        trckbm: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        jlDybdoid: [
          { required: true, message: "主键不能为空", trigger: "blur" }
        ],
        dybdlx: [
          { required: true, message: "倒运磅单类型不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询调运指令列表 */
    getList() {
      this.loading = true;
      listJldybd(this.queryParams).then(response => {
        this.jldybdList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        jlDybdoid: null,
        bdbm: null,
        dybdlx: null,
        rcrqsj: null,
        ccrqsj: null,
        sfdd: null,
        bmbm: null,
        drbm: null,
        rybm: null,
        trckbm: null,
        yfs: null,
        yfm: null,
        yfp: null,
        yfj: null,
        mz: null,
        pz: null,
        jz: null,
        kz1: null,
        kz2: null,
        sssl: null,
        zdr: null,
        jby: null,
        sbdd: null,
        thbdbm: null,
        thbdmx: null,
        thbdsl: null,
        ysbdht: null,
        jsbm: null,
        hybm: null,
        zyrq: null,
        zyr: null,
        hybmcy: null,
        cyrq: null,
        cyr: null,
        hydbm: null,
        hyrq: null,
        hyr: null,
        dfph: null,
        dzbm: null,
        bz: null,
        shr1: null,
        shr2: null,
        shr3: null,
        chph: null,
        dfdd: null,
        wg: null,
        kl: null,
        djlx: null,
        djbs: null,
        del: null,
        djzt: null,
        cczdr: null,
        card: null,
        banci: null,
        rkrq: null,
        rksj: null,
        ckrq: null,
        cksj: null,
        kuguan: null,
        qfbm: null,
        cccs: null,
        clbm: null,
        c01: null,
        c02: null,
        c03: null,
        c04: null,
        c05: null,
        c06: null,
        c07: null,
        c08: null,
        c09: null,
        c10: null,
        n01: null,
        n02: null,
        n03: null,
        n04: null,
        n05: null,
        n06: null,
        n07: null,
        n08: null,
        n09: null,
        n10: null,
        czbs: null,
        dcdwoid: null,
        fyDyzloid: null,
        fyDaoyunpaicheoid: null,
        jcKeshangdaoid: null,
        jcInventoryoid: null,
        jcCheliangdaoid: null,
        drdwoid: null,
        cydwoid: null,
        jcWarehouseoid: null,
        jsYunfeioid: null,
        htYunshuoid: null,
        mjDaoyunoid: null,
        jcIcFlowoid: null,
        jcIcCardoid: null,
        jcGongzuoddoid: null,
        jcShoufaoid: null,
        jbyoid: null,
        jcGongzuoddoid2: null,
        sjxm: null,
        cyzgz: null,
        jsz: null,
        shbs: null,
        zhoushu: null,
        glbdoid: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.jlDybdoid)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加调运指令";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const jlDybdoid = row.jlDybdoid || this.ids
      getJldybd(jlDybdoid).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改调运指令";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.jlDybdoid != null) {
            updateJldybd(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addJldybd(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const jlDybdoids = row.jlDybdoid || this.ids;
      this.$modal.confirm('是否确认删除调运指令编号为"' + jlDybdoids + '"的数据项？').then(function() {
        return delJldybd(jlDybdoids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('transport/inner/jldybd/export', {
        ...this.queryParams
      }, `jldybd_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
